<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        //call作用1：调用函数
        function fn(x,y){
            console.log('喝咖啡');
            console.log(this);
            console.log(x+y);
        }
        // fn();
        fn.call();

        var o = {
            name:'andy'
        };
        //call作用2：修改this指向
        fn.call(o,1,2)
    </script>
</body>
</html>